<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE HTML>
<html>
  <head>
    
    <title>项目管理系统登陆界面</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="../../css/animate.min.css">
	<link rel="stylesheet" type="text/css" href="../../css/bootstrap.min.css">
	<script type="text/javascript" src="../../js/jquery.js"></script>

	<style type="text/css">
	
		body {
			//background-color: #036AAC;
		}
		
		.container{
			background: url("../../img/login.jpg") no-repeat;
			height: 730px;
			width: 1024px;
			
		
		}
		
		.account{
			display:block;
			margin-top: 315px;
			margin-left: 470px;
			width: 160px;
			height: 15px;
			float: left;
		}
		.password{
			display: block;
			margin-left: 470px;
			width: 160px;
			height: 15px;
			float: left;
		}
		
		.btn{
			width: 80px;
			height: 70px;
			margin-top: -42px;
			float: right;
						
			margin-right: 287px;
		}
		
		.btn-danger{
			width: 200px;
			height:30px;
			float:right;
			display:none;
			margin-top: 10px;
			text-align:center;
			
			line-height:30px;
			margin-right: 350px;
			
		}
		
		.btn-warning{
			width: 500px;
			height:50px;
			float:right;
			margin-top:100px;
			margin-right:230px;
			color:white;
			text-align:center;
			
			line-height:50px;
			font-size: 20px;
		}
	</style>
  </head>
  
  <body>
    	<div class="container">
    		
    		
    		<form method="post" action="/login.jspx" enctype="application/x-www-form-urlencoded">
    			<input class="account" type="text" name="account" />
    			<input class="password" type="password" name="password" />
    			<button class="btn">Go</button>
    			
    			<label class="btn-danger"></label>
    		</form>
    		<c:if test="${not empty sessionScope.login_error}">
    			<label class="btn-warning">${sessionScope.login_error }</label>
    			<c:remove var="login_error" scope="session"/>
    		</c:if>
    		
    		
    	</div>
    	
	
	<script type="text/javascript">

	 	$(document).ready(function(){

	 		$(".container").addClass("animated flash");
	 		
	 		$(".btn").click(function(e){
	 			e.preventDefault();
	 			$(".btn-danger").text("").hide();

				var account = $(".account").val();
				if(!account)
				{
					$(".btn-danger").text("用户名不能为空").show();
					return;
				}

				var password = $(".password").val();
				if(!password)
				{
					$(".btn-danger").text("密码不能为空").show();
					return;
				}

				$("form:eq(0)").submit();

		 	});
			
		});
	
	
	</script>

  </body>
</html>
